A technology for an AMR (Adaptive Multi-Rate, adaptive multi-rate) speech encoder to perform adaptive switching according to a channel condition includes two aspects: adaptation of a channel mode, and adaptation of a source encoding mode and a channel encoding mode.
Adaptive switching of the channel mode is stable, where the switching is performed only when a call connection is established between the encoder and a system or the encoder enters a new cell. That is to say, each time when a call connection is established between the encoder and the system or the encoder enters a new cell, a network allocates a fixed channel rate mode to two communicating parties according to the channel condition, where the fixed channel rate mode which is either a full speed channel mode or a half speed channel mode. Once the channel mode is determined, no switching occurs in a call process, and then adaptive switching of the source encoding mode and the channel encoding mode is performed according to the determined channel mode and channel quality in the call process. The adaptation of the source encoding mode and the channel encoding mode is adjusted mainly through a CMR (Codec Mode Request, codec mode request) of a downlink and a CMC (Codec Mode Command, codec mode command) of an uplink.
An MS (Mobile Station, mobile station) continuously detects the channel quality, determines an encoding mode of the downlink according to the channel quality, and sends the downlink CMR to a BSS (Base Station Sub-system, base station sub-system). After receiving the request, the BSS combines CMI (Codec Mode Indication, codec mode indication) data and corresponding encoding mode data to form an AMR speech frame according to the CMR and transmits the AMR speech frame to the MS in the downlink. After receiving a signal, a receiving terminal of the MS first decodes the CMI and decodes a speech part according to a speech encoding mode indicated by the CMI.
The AMR speech frame is generally classified to an AFS speech frame and an AHS speech frame according to different channel modes. Each AFS speech frame includes 8-bit InBand (in-band) signaling encoded data, which is obtained by encoding 2-bit CMI data. Each AHS speech frame includes 4-bit in-band signaling encoded data, which is obtained by encoding the 2-bit CMI data.
In the prior art, encoded bits of the received InBand signaling are decoded by using a maximum likelihood function, where sent encoded bits are correlated with decoded bits of a received signal and then the correlation values are sorted in order, and a mode through which a maximum correlation value is obtained is a decoding mode of in-band signaling.
During the implementation of the in-band signaling decoding, the inventors find that the prior art has at least the following problems. Currently, in-band signaling data is not often changed, and when it is required to determine the decoding mode of the in-band signaling, the decoding mode of the in-band signaling is determined only by correlating the sent encoded bits with the decoded bits of the received signal, which causes that accuracy of the in-band signaling decoding is low.